To Create a Feature of Type GeoRaster
-
Create the table with one geometry column and one ID.
CREATE TABLE Toronto (Id NUMBER PRIMARY KEY, ImageName varchar2(256), RASTER SDO_GEORASTER);
-
Create the raster data table.
CREATE TABLE Toronto_rdt of sdo_raster (primary key(rasterid, pyramidlevel, bandblocknumber, rowblocknumber, columnblocknumber));
- Import the raster data.
-
Insert the table metadata in the Oracle Spatial metadata.
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID) VALUES ('TORONTO', 'raster.spatialExtent', MDSYS.SDO_DIM_ARRAY (MDSYS.SDO_DIM_ELEMENT('X', 310630.031200000, 314302.525626524, 0.000000050), MDSYS.SDO_DIM_ELEMENT('Y', 4832370.186944857, 4835182.257600000, 0.000000050) ), 2019);
-
Create the spatial index of type multipolygon to use model multi-geometry objects.
CREATE INDEX toronto_idx ON Toronto (raster.spatialExtent) INDEXTYPE IS MDSYS.SPATIAL_INDEX;